package com.four.peoplemanage.brcards.dao;

import com.four.peoplemanage.brcards.entity.Brcards;
import com.four.peoplemanage.cards.entity.Cards;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface BrcardsDao {
    //查看所有
    @Select(
            "SELECT * FROM traffic.brcards " +
                    "limit #{start}, #{size}" )
    List<Brcards> canBrcards(int start, int size);
    //分页
    @Select(
            "SELECT count(*) FROM traffic.brcards" )
    public int countBrcards();
    //新增
    @Insert("insert into brcards (information_id,pickuptime,pickuppeople,remark,estimated_return_date)"+
            "values (#{information_id},#{pickuptime},#{pickuppeople},#{remark},#{estimated_return_date})")
    public int addBrcard(Brcards brcards);
}
